package com.ruoyi.shop.emporium.issue.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mall.common.mapper.DtsIssueMapper;
import com.ruoyi.mall.common.domain.DtsIssue;
import com.ruoyi.shop.emporium.issue.service.IDtsIssueService;

/**
 * 通用问题Service业务层处理
 *
 * @author ruoyi
 * @date 2025-02-13
 */
@Service
public class DtsIssueServiceImpl implements IDtsIssueService
{
    @Autowired
    private DtsIssueMapper dtsIssueMapper;

    /**
     * 查询通用问题
     *
     * @param id 通用问题主键
     * @return 通用问题
     */
    @Override
    public DtsIssue selectDtsIssueById(Long id)
    {
        return dtsIssueMapper.selectDtsIssueById(id);
    }

    /**
     * 查询通用问题列表
     *
     * @param dtsIssue 通用问题
     * @return 通用问题
     */
    @Override
    public List<DtsIssue> selectDtsIssueList(DtsIssue dtsIssue)
    {
        return dtsIssueMapper.selectDtsIssueList(dtsIssue);
    }

    /**
     * 新增通用问题
     *
     * @param dtsIssue 通用问题
     * @return 结果
     */
    @Override
    public int insertDtsIssue(DtsIssue dtsIssue)
    {
        return dtsIssueMapper.insertDtsIssue(dtsIssue);
    }

    /**
     * 修改通用问题
     *
     * @param dtsIssue 通用问题
     * @return 结果
     */
    @Override
    public int updateDtsIssue(DtsIssue dtsIssue)
    {
        dtsIssue.setUpdateTime(DateUtils.getNowDate());
        return dtsIssueMapper.updateDtsIssue(dtsIssue);
    }

    /**
     * 批量删除通用问题
     *
     * @param ids 需要删除的通用问题主键
     * @return 结果
     */
    @Override
    public int deleteDtsIssueByIds(Long[] ids)
    {
        return dtsIssueMapper.deleteDtsIssueByIds(ids);
    }

    /**
     * 删除通用问题信息
     *
     * @param id 通用问题主键
     * @return 结果
     */
    @Override
    public int deleteDtsIssueById(Long id)
    {
        return dtsIssueMapper.deleteDtsIssueById(id);
    }
}
